package com.njwb.day18.thd04;

public class MyRunnable  implements Runnable{
    private MyOperator myOperator ;

    public MyOperator getMyOperator() {
        return myOperator;
    }

    public void setMyOperator(MyOperator myOperator) {
        this.myOperator = myOperator;
    }

    @Override
    public void run() {
        if("数字线程".equals(Thread.currentThread().getName())) {
            myOperator.printNum();
        }else if("字母线程".equals(Thread.currentThread().getName())) {
            myOperator.printAbc();
        }

    }



}
